package practice;

public class practice006 {
	// 有m个元素的数组内容，做K位循环右移位，只允许用一个临时存储单元。
	public static void main(String[] args) {
		int[] a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };
		int i, j, temp, k;
		k = 5;
		for (i = 0; i < k; i++) {
			temp = a[13];
			for (j = 1; j < 14; j++) {
				a[13 - j + 1] = a[13 - j];
			}
			a[0] = temp;
		}
		for (i = 0; i < 14; i++) {
			if (i != 13) {
				System.out.print(a[i] + ",");
			}
			else {
				System.out.print(a[i]);
			}
			
		}

	}

}
